@import "variables";

.archived {
  background-image: repeating-linear-gradient(45deg, white, white 20px, @grey5-color 20px, @grey5-color 40px);

  .warning-icon {
    font-size: 20px;
    margin-right: 8px;
    color: @red50-color;
  }

  .content {
    margin-top: 8px;
    font-size: 13px;

    .restore {
      text-decoration: underline;
      font-weight: bold;
    }

    .delete {
      color: @red50-color;
      text-decoration: underline;
      font-weight: bold;
    }
  }
}

.block {
  &:not(:first-child) {
    margin-top: 10px;
  }

  padding: 15px 24px 15px 24px;
  background-color: @grey5-color;
  border-radius: 20px;
  min-height: 50px;

  .edit-save {
    cursor: pointer;
  }

  .actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;

    i {
      cursor: pointer;
    }
  }

  .title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    line-height: 150%;
    color: @grey70-color;
    height: 30px;
    gap: 8px;

    .text {
      display: inline-block;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      max-width: 221px;
    }
    input {
      border-radius: 8px;
    }
  }

  .variation-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;

    .label {
      display: inline-block;
      margin-right: 12px;
    }

    .value {
      display: flex;
      align-items: center;
      font-size: 14px;

      i {
        margin-left: 8px;
        font-size: 16px;
        cursor:pointer;
      }
    }

    nz-select {
      width: 100px;
    }
  }

  .flag-key {
    margin-top: 16px;

    .title {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      gap: 8px;
    }

    i {
      cursor: pointer;
      font-size: 16px;
    }

    .key-container {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;

      i {
        font-size: 13px;
      }
    }
  }

  .flag-description {
    margin-top: 4px;
    color: @grey50-color;
    border: 1px solid @grey20-color;
    border-radius: 8px;
    padding: 5px;

    &.editing {
      border: none;
      padding: 0;
    }

    .edit-save {
      width: 100%;
      text-align: right;
    }

    textarea {
      border-radius: 8px;
      margin-bottom: 8px;
    }
  }

  .tags {
    margin-top: 16px;

    .selected {
      display: flex;
      flex-wrap: wrap;
      gap: 0;
      row-gap: 4px;
      border: 1px solid @grey20-color;
      background-color: #ffffff;
      padding: 5px;
      box-sizing: border-box;
      border-radius: 8px;
      margin-bottom: 12px;

      nz-tag {
        background: @grey20-color;
        border-radius: 4px;
        padding: 2px 4px 2px 5px;
        line-height: 15px;
        margin-right: 10px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }

    nz-select {
      width: 100%;
    }
  }

  .status-switcher {
    margin-top: 20px;

    .switcher {
      display: flex;
      align-items: center;
      nz-switch {
        margin-right: 3px;
      }
    }

    .disabled-variation {
      margin-top: 12px;
      display: flex;
      justify-content: flex-start;
      align-items: center;

      .label {
        display: inline-block;
        margin-right: 12px;
      }

      nz-select {
        width: 160px;
      }
    }

    nz-tag {
      border-radius: 10px;

      &.on {
        color: #389e0d;
        background: #f6ffed;
        border-color: #b7eb8f;
      }

      &.off {
        color: #cf1322;
        background: #fff1f0;
        border-color: #ffa39e
      }
    }
  }

  .options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;

    .option-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;

      .name {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }

      .value {
        display: flex;
        align-items: center;
        gap: 2px;

        nz-tag {
          flex-grow: 1;
          min-width: 50px;
          max-width: 96px;
          text-align: center;
          text-overflow: ellipsis;
          white-space: nowrap;
          overflow: hidden;
          &:hover{
            cursor: pointer;
          }
        }

        i {
          cursor: pointer;
          font-size: 16px;
        }
      }
    }

    input.invalid, nz-input-group.invalid {
      border: 1px solid #F00 !important;

      &:hover, &:focus {
        box-shadow: 0 0 0 2px rgb(255 0 0 / 20%);
      }
    }
  }

  .operations {
    display: flex;
    justify-content: flex-end;
    gap: 8px;

    button {
      min-width: 72px;
      border-radius: 8px;
    }

    .save-btn {
      border: 1px solid @green60-color;
      color: @green60-color;

      &:hover {
        background-color: @green10-color;
      }
    }

    .cancel-btn {
      color: @grey50-color;
      border: 1px solid @grey40-color;

      &:hover {
        background-color: @grey10-color;
      }
    }
  }

  .languages-frameworks {
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;

    .line {
      margin: 3px 0;
      width: 100%;

      &:first-child{
        margin-top: 0;
      }

      &:last-child{
        margin-bottom: 0;
      }

      display: flex;
      justify-content: space-between;
      align-items: center;
      button {
        border: none;
        background: @purple50-color;
        border-radius: 8px;
        width: 120px;
        height: 37px;
        padding: 8px 12px;
        color: #FFFFFF;
        margin-bottom: 10px;
        cursor: pointer;
      }
    }
  }

  i:not(.warning-icon) {
    color: @grey50-color;
    &:hover {
      color: @grey70-color;
    }
  }
}

::ng-deep .cdk-drag-preview {
  display: table;
}

::ng-deep .cdk-drag-placeholder {
  opacity: 0;
}

::ng-deep .option-value-editor .ant-modal-body {
  padding: 20px 30px;

  .ant-code-editor {
    border-radius: 8px;
    overflow: hidden;
  }
}

.expt-references {
  .warning-message {
    font-size: 15px;
    font-weight: 500;
    padding: 10px;
    border: 1px solid #d2d2d2;
    border-left: 3px solid @yellow5-color;
    border-radius: 10px;

    .warning {
      display: flex;

      .warning-icon {
        color: @yellow5-color;
      }
      .warning-content {
        padding-left: 5px;
      }
    }
  }

  .table-wrapper {
    padding: 0;

    .expt-status-col {
      display: flex;
      justify-content: flex-start;
      align-items: center;
      height: 56px;

      .expt-status {
        width: 10px;
        height: 10px;
        border: none;
        border-radius: 10px;
        margin-right: 12px;

        &.ongoing {
          background-color: @green60-color;
        }

        &.paused {
          background-color: @red50-color;
        }

        &.not-started {
          background-color: @blue50-color;
        }
      }
    }
  }
}

.variations-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;

  i {
    font-size: 16px;
    cursor: pointer;
  }

  .add-variation {
    width: 50px;
    text-align: left;
  }

  .variation-wrapper {
    border-radius: 10px;
    border: 1px solid @grey0-color;
    padding: 12px 12px 0 12px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    ::ng-deep .ant-input-suffix {
      padding-left: 6px;
    }

    nz-input-group {
      height: 40px;
      border-radius: 8px;
      input {
        height: 100%;
      }
    }

    nz-form-control {
      width: 238px;
    }

    &.with-extra-options {
      nz-form-control {
        width: 218px;
      }
    }
  }
}
